//
//  FormalTableViewCell.m
//  Homework_10
//
//  Created by 徐昊 on 16/7/27.
//  Copyright © 2016年 徐昊. All rights reserved.
//

#import "FormalTableViewCell.h"
#import "UIView+Frame.h"
@interface FormalTableViewCell ()

@end

@implementation FormalTableViewCell

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier {
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _carImageView = [[UIImageView alloc] init];
        _carImageView.backgroundColor = [UIColor grayColor];
        [self.contentView addSubview:_carImageView];
        _carIntroduce = [[UILabel alloc] init];
        _carIntroduce.backgroundColor = [UIColor greenColor];
        [self.contentView addSubview:_carIntroduce];
    }
    return self;
}
- (void)layoutSubviews {
    [super layoutSubviews];
    _carImageView.frame = CGRectMake(5, 5, (self.contentView.h_width - 15) / 3, self.contentView.h_height - 10);
    _carIntroduce.frame = CGRectMake((self.contentView.h_width - 15) / 3 + 10, 5, (self.contentView.h_width - 15) * 2 / 3, self.contentView.h_height - 10);
}
- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
